package com.mspbots.attendance.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mspbots.attendance.mapper.TenantUserConfigMapper;
import com.mspbots.attendance.model.TenantUserConfiguration;
import com.mspbots.attendance.service.TenantUserConfigService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户配置接口实现
 *
 * @author suozhaoyu
 */
@Service
public class TenantUserConfigServiceImpl
        extends ServiceImpl<TenantUserConfigMapper, TenantUserConfiguration>
        implements TenantUserConfigService {

    /**
     * 获取keyword为work_time状态的数据-分页
     *
     * @param page
     * @param query
     * @return
     */
    @Override
    public IPage<TenantUserConfiguration> workTimePage(Page<TenantUserConfiguration> page, TenantUserConfiguration query) {
        List<TenantUserConfiguration> list = baseMapper.workTimePage(page, query);
        page.setRecords(list);
        return page;
    }
}
